﻿using IT_RoadBlock.Comands;
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace IT_RoadBlock.Entities
{
    [Table("T_PROJECT_INFO")]
    public class TProjectInfo : BaseSelectEntity
    {
        private DateTime? createTime;
        private string remark;
        private string projectCode;
        private string name;
        private int? id;

        [Key]
        [Column("ID")]
        public int? Id { get => id; set
            {
                id = value;
                OnPropertyChanged(nameof(Id));
            }
        }

        [Required]
        [MaxLength(64)]
        [Column("NAME")]
        public string Name { get => name; set { 
                name = value;
               OnPropertyChanged(nameof(Name));
            }
        }


        [Required]
        [MaxLength(64)]
        [Column("PROJECT_CODE")]
        public string ProjectCode { get => projectCode; set { 
                projectCode = value;
                OnPropertyChanged(nameof(ProjectCode));
            }
        }


        [MaxLength(1024)]
        [Column("REMARK")]
        public string Remark { get => remark; set { 
                remark = value;
                OnPropertyChanged(nameof(Remark));
            }
        }


        [Column("CREATE_TIME")]
        public DateTime? CreateTime { get => createTime; set { 
                createTime = value;
                OnPropertyChanged(nameof(CreateTime));
            }
        }
    }
}
